feat(Fork): complete forking lemma proof with seeded oracle infrastructure#113
feat(Fork): complete forking lemma proof with seeded oracle infrastructure#113
Conversation
Close `FiatShamir.exec_lift_probComp` and replace the forking lemma checkpoint with a full bound decomposition proof, leaving only the core square-bound subgoal for follow-up. Made-with: Cursor
…ture Prove the full forking lemma (`le_probOutput_fork`, `probOutput_none_fork_le`) by establishing seeded oracle faithfulness, the addValue/takeAtIndex factorization lemmas, and a Cauchy-Schwarz bound for ENNReal tsum. Also adds QuerySeed operations (pop, prependValues, takeAtIndex) and the generateSeedCounts seed generator. Made-with: Cursor
🤖 AI-Generated PR SummaryFiles Changed:
Overview of Changes: Here is a summary of the key changes:
New 'sorry's: 0 |
Add co-authorship credit for substantial contributions across OracleComp, EvalDist, CryptoFoundations, and Examples modules. Made-with: Cursor
Summary
This PR completes the formal proof of the forking lemma, a key tool in provable security for bounding the success probability of "fork-and-replay" reductions.
Forking lemma (
Fork.lean, +295 lines)le_probOutput_fork: per-index lower bound showingPr[cf(main) = s]² - Pr[cf(main) = s] / |Range i| ≤ Pr[fork succeeds at s]probOutput_none_fork_le: main failure-probability boundPr[fork fails] ≤ 1 - acc * (acc / q - 1/h)probOutput_collision_le_main_div), no-guard factorization, and the Cauchy-Schwarz / Jensen step via prefix groupingSeeded oracle faithfulness (
SeededOracle.lean, +628 lines)evalDist_liftComp_generateSeed_bind_simulateQ_run': seeded simulation preserves distributions (the core faithfulness theorem)evalDist_liftComp_uniformSample_bind_simulateQ_run'_addValue: adding a uniform value to a seed doesn't change the distributionevalDist_liftComp_generateSeed_bind_simulateQ_run'_takeAtIndex: truncating the seed preserves distributionstsum_probOutput_generateSeed_weight_takeAtIndex: weighted faithfulness for prefix-dependent weights (used in the Jensen step)generateSeedCounts: product seed generator with explicit per-index counts and full support characterizationQuerySeed operations (
Structures.lean, +54 lines)pop,prependValues,takeAtIndexwith simp lemmas, injectivity, and round-trip propertiesENNReal inequalities (
SumSquares.lean, +44 lines, new file)sq_tsum_le_tsum_sq: Cauchy-Schwarz for weightedℝ≥0∞tsumsq_sum_le_card_mul_sum_sq: finite Cauchy-Schwarz forℝ≥0∞sumsOther
Test plan
lake buildpassessorryin any changed file